-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search age range #25
base: dev
Are you sure you want to change the base?
Search age range #25
Conversation
end | ||
|
||
Then(/^a list of age\-filtered profiles is diplayed$/) do | ||
save_and_open_page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed now.. thanks!
006c0de
to
9afe826
Compare
@@ -23,6 +23,15 @@ def search | |||
if params[:distance] | |||
@results = @results.near(current_customer.profile.postcode, params[:distance].to_f) | |||
end | |||
|
|||
if params[:age] | |||
@results = @results.select do |result| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using select
, use a where
and perform your searches at the DB level
@tamlyn10 this needs patching up before I can merge |
9afe826
to
83eb471
Compare
83eb471
to
bdb20ac
Compare
Still got some failing tests on this one |
No description provided.